// @ts-expect-error -- 忽略React未使用
import React, { StrictMode } from "react";
import { createRoot } from "react-dom/client";

const App = () => {
  const [count, setCount] = React.useState(0);

  return (
    <div>
      <h1>esbuild + React + TS</h1>
      <p>count: {count}</p>
      <button onClick={() => setCount((c) => c + 1)}>+1</button>
    </div>
  );
};

// @ts-expect-error -- 忽略document.getElementById
createRoot(document.getElementById("root")).render(
  <StrictMode>
    <App />
  </StrictMode>,
);
